import React from "react";
import Home from "./pages/Home";
import Login from "./pages/Login";
import My from "./pages/My";
import Index from "./pages/Index";
import NotFound from "./pages/NotFound";
import NewsList from "./pages/NewsList";
import NewsDetails from "./pages/NewsDetails";
import GoodsList from "./pages/GoodsList";
import GoodsDetails from "./pages/GoodsDetails";
import AuthComponent from "./components/AuthComponent";
import { Route, Routes } from "react-router-dom";
import "./App.css";
export default function App() {
  return (
    <div className={"container"}>
      <Routes>
              <Route path={"/"} element={<Index />}>
                  <Route path={'newsList'} element={<NewsList/>}></Route>
                  <Route path={'goodsList'} element={<GoodsList/>}></Route>
                  <Route path={'my'} element={<AuthComponent><My/></AuthComponent>}></Route>
                  <Route index element={<Home/>}></Route>
        </Route>
        <Route path={"/goodsDetails"} element={<GoodsDetails/>}></Route>
        <Route path={"/newsDetails" }element={<NewsDetails/>}></Route>
        <Route path={"/Login"} element={<Login/>}></Route>
        <Route path={"*"} element={<NotFound/>}></Route>

      </Routes>
    </div>
  );
}
